package com.tjsinfo.tjsoa.message;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.jbpm.configuration.ConfigurationException;

import com.tjsinfo.tjsoa.addresslist.bo.IAddressListSystemUserBo;
import com.tjsinfo.tjsoa.system.vo.User;
public class SendMessage {

	public void send(){
		if(User.getSendMessage().size()>0){
				Configuration configuration;
				try {
					configuration = new PropertiesConfiguration("com/tjsinfo/tjsoa/message/properties/message.properties");
					JmlSend jml = new JmlSend();
					jml.setEmail(configuration.getString("address"));
					jml.setPassword(configuration.getString("password"));
					jml.login();
					jml.sendMessage(User.getSendMessage());
					
					//feixin fx = new feixin();
					//fx.sendMessage(User.getFeiXin());
				} catch (ConfigurationException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (org.apache.commons.configuration.ConfigurationException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		
		
	}
}
